<template>
	<view class="conter">
		<view class="header_nav">
			<view class="header-title flex-box">
				<view @tap="gohome('/pages/tab/home')" style="margin-left: 50rpx;">
					<text class="cuIcon-back"></text>
				</view>
				<view class="">
					今日新增
				</view>
				<view class="">
				</view>
			</view>
			<view class="header_tlt">
				<view class="ww100 flex align-center justify-around">
					<view class="flex align-center w260">
						<image src="../../static/index/z.png" class="w60 h60" mode=""></image>
						<view class="lh43" style="margin-left: 20rpx;">
							总库存量
							<view class="">
								{{fromData.stock_num}}
							</view>
						</view>
					</view>
					<view class="flex align-center w260">
						<image src="../../static/index/k.png" class="w60 h60" mode=""></image>
						<view class=" lh43" style="margin-left: 20rpx;">
							待归还数量
							<view class="">
								{{fromData.back_num}}
							</view>
						</view>
					</view>
				</view>
				<view class="ww100 flex align-center justify-around" style="margin-top: 50rpx;">
					<view class="flex align-center w260">
						<image src="../../static/index/r.png" class="w60 h60" mode=""></image>
						<view class=" lh43" style="margin-left: 20rpx;">
							总入库量
							<view class="">
								{{fromData.buy_order_num}}
							</view>
						</view>
					</view>
					<view class="flex align-center w260">
						<image src="../../static/index/c.png" class="w60 h60" mode=""></image>
						<view class=" lh43" style="margin-left: 20rpx;">
							总借出单
							<view class="">
								{{fromData.back_order_num}}
							</view>
						</view>
					</view>
				</view>
			</view>
		</view>

		<!-- 宫格 -->
		<view class="nav">
			<view class="nav-text" style="display: flex;">
				<view @tap="gohome('/pages/putStock/index')" url="" class="nav-left"
					style="margin-right: 30rpx; background-color: #1AC1EC;">
					<view class="nav-image">
						<image class="w114 h114" src="../../static/index/put.png" mode=""></image>
					</view>
					<view class="mtop-text">入库</view>
				</view>
				<view @tap="gohome('/pages/removeStock/index')" class="nav-left" style="background-color: #20E4BD;">
					<view class="nav-image">
						<image class="w114 h114" src="../../static/index/stock.png" mode=""></image>
					</view>
					<view class="mtop-text">出库</view>
				</view>
			</view>
			<view class="nav-text" style="display: flex;">
				<view @tap="gohome('/pages/stock/index')" class="nav-left"
					style="margin-right: 30rpx; background-color: #70A2FF;">
					<view class="nav-image">
						<image class="w114 h114" src="../../static/index/check.png" mode=""></image>
					</view>
					<view class="mtop-text">盘点</view>
				</view>
				<!-- :url="'?tilte=' + tilte " hover-class="view-hover" -->
				<view @tap="gohome('/pages/contact/index')" class="nav-left" hover-class="navigator-hover"
					style="background-color: #8B6DFF;">
					<view class="nav-image">
						<image class="w114 h114" src="../../static/index/laiwang.png" mode=""></image>
					</view>
					<view class="mtop-text">往来单位</view>
				</view>
			</view>
			<view class="nav-text" style="display: flex;">
				<view @tap="gohome('/pages/warehouse/index')" hover-class="navigator-hover" class="nav-left"
					style="margin-right: 30rpx; background-color: #F79AC4;">
					<view class="nav-image">
						<image class="w114 h114" src="../../static/index/warehouse.png" mode=""></image>
					</view>
					<view class="mtop-text">仓库管理</view>
				</view>
				<!-- <navigator url="/pages/shopping/index" class="nav-left" hover-class="navigator-hover" style="background-color: #8B6DFF;">
					<view class="nav-image"><image src="../../static/index/laiwang.png" mode=""></image></view>
					<view class="mtop-text">商品</view>
				</navigator> -->
				<view @tap="gohome('/pages/shopping/class')" class="nav-left" hover-class="navigator-hover"
					style="background-color: #8B6DFF;">
					<view class="nav-image">
						<image class="w114 h114" src="../../static/index/laiwang.png" mode=""></image>
					</view>
					<view class="mtop-text">商品</view>
				</view>
			</view>
		</view>
		
		
		
		<yy-home></yy-home>
		
		
		
		
	</view>
</template>

<script>
	export default {
		components: {},
		data() {
			return {
				tilte: '往来单位',
				pustStoack: '',
				back_store: '',
				sum_enter: '',
				sum_back: '',
				fromData: {},
			};
		},
		onLoad() {},
		onShow() {
			this.fromData = {}
			this.getList();
		},
		methods: {
			goFile(url) {
				console.log(url + '');
				uni.navigateTo({
					url: 'url',
				});
			},

			async getList() {
				const res = await this.$u.post('api/Invoic/index');
				this.fromData = res.data
				console.log(this.fromData)
			},

			gohome(url) {
				uni.navigateTo({
					url,
				})
			}
		},
	};
</script>

<style lang="scss" scoped>
	.conter {
		color: #ffffff;
		// padding-top: 60rpx;
		padding-bottom: 100rpx;


		.header_nav {
			width: 100%;
			// height: 388rpx;
			padding-top: 100rpx;
			background: linear-gradient(to right, #656ce6, #9397fc);

			.header-title {
				color: #ffffff;
				text-align: center;
				font-size: 36rpx;
				font-family: PingFang SC;
				font-weight: 500;
				margin-bottom: 40rpx;
			}

			.header_tlt {
				width: 100%;
				height: 260rpx;
				font-size: 26rpx;
				font-weight: 500;
				font-family: PingFang SC;
				// padding: 70rpx 0 20rpx;

			}
		}

		.nav {
			width: 100%;
			padding: 30rpx;
			background-color: #f8f9ff;

			.nav-text {
				margin-bottom: 30rpx;

				.nav-left {
					width: 330rpx;
					height: 330rpx;
					padding-top: 68rpx;
					justify-content: center;
					align-items: center;
					text-align: center;
					border-radius: 10rpx;

					.nav-image {
						width: 114rpx;
						height: 114rpx;
						margin: 0 auto;
					}
				}

				.mtop-text {
					margin-top: 16rpx;
					font-size: 38rpx;
					font-family: PingFang SC;
					font-weight: 500;
				}
			}
		}
	}
</style>
